package com.itheima.consumer.feign;

import com.itheima.consumer.config.FeignLogConfig;
import com.itheima.consumer.domain.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
//name也就是value是要调用的那个微服务的名字
@FeignClient(value = "eureka-provider",configuration = FeignLogConfig.class)
public interface GoodsFeignClient {

    @GetMapping("/goods/findId/{id}")
    public Goods findGoodsById(@PathVariable("id") int id);

}